#include "egg.h"

Egg::Egg(QPoint p)
{
    this->topLeft=p;
}

const QImage &Egg::getImage()
{
    static const QImage image=QImage(imagesDirectory+"egg.png","PNG").scaled(productSize.width(),productSize.height());
    return image;
}


int Egg::getType()
{
    return EGG;
}

QRegion Egg::getRegion()
{
    static const QBitmap bm=QBitmap::fromImage(QImage(imagesDirectory+"egg.bmp","BMP").scaled(productSize.width(),productSize.height()),Qt::MonoOnly);
    static const QRegion region(bm);
    return region.translated(topLeft);
}
